<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script src="../js/pixi.min.js"></script>
		<script type="text/javascript">
			var app=new PIXI.Application(1000,600);
			document.body.appendChild(app.view);
			function add(src,x,y,shi){
				var yuans=new PIXI.Sprite.fromImage(src);
				yuans.x=x;
				yuans.y=y;
				app.stage.addChild(yuans);
				
				yuans.interactive=true;
				return yuans;
			}
			 add("img/bg (1).png",0,0,1);
			var pai= add("img/dou0.png",200,400,0);
			var pai2= add("img/dou1.png",240,400,0);
			var pai3= add("img/dou2.png",260,400,0);
			var pai4= add("img/dou3.png",300,400,0);
			add("img/item.png",0,0,1);
			
				var shang=false;
			function chupai(){
				
				if (shang) {
					pai.y+=40;
					shang=false;
				} else{
					pai.y-=40;
					shang=true;
				}
				
			}
			function chupai2(){
				
				if (shang) {
					pai2.y+=40;
					shang=false;
				} else{
					pai2.y-=40;
					shang=true;
				}
				shang=false;
			}
			function chupai3(){
				
				if (shang) {
					pai3.y+=40;
					shang=false;
				} else{
					pai3.y-=40;
					shang=true;
				}
			}
			function chupai4(){
				
				if (shang) {
					pai4.y+=40;
					shang=false;
				} else{
					pai4.y-=40;
					shang=true;
				}
			}
			
			pai.on("pointerdown",chupai);
			pai2.on("pointerdown",chupai2);
			pai3.on("pointerdown",chupai3);
			pai4.on("pointerdown",chupai4);
			
			
			
		</script>
	</body>
</html>